import numpy as np

# 假设这是你的信号数据
signal = np.array([4.1, 5.2, 6.3, 7.1, 8.5, 9.6, 10.3, 11.8, 12.9, 13.0])

# 计算每两个相邻数据点的差值
differences = np.diff(signal)

# 计算标准偏差
std_dev = np.std(signal)
print(f'标准偏差: {std_dev}')

# 计算平均绝对偏差
mad = np.mean(np.abs(signal - np.mean(signal)))
print(f'平均绝对偏差: {mad}')

# 计算差值的标准偏差
std_dev_diff = np.std(differences)
print(f'差值的标准偏差: {std_dev_diff}')

# 计算差值的平均绝对偏差
mad_diff = np.mean(np.abs(differences - np.mean(differences)))
print(f'差值的平均绝对偏差: {mad_diff}')